<script setup lang="ts">
const emit = defineEmits(['click'])

const props = withDefaults(
  defineProps<{
    prefix: string
    name: string
    width: string
    height: string
    fill: string
  }>(),
  {
    prefix: 'icon',
    fill: '#fff'
  }
)
</script>
<template>
  <svg class="svg-icon" :style="{ width, height }" @click="emit('click')">
    <use :xlink:href="`#${prefix}-${name}`" v-bind="props"></use>
  </svg>
</template>
<style lang="scss" scoped></style>
